home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / amiga / raytrace / real3d / rl_dvlpr.lha / Source / asmsupp.i < prev    next >
Text File  |  1992-07-22  |  1KB  |  69 lines

  1. *************************************************************************
  2. *
  3. *    Copyright (C) 1985, Commodore Amiga Inc.  All rights reserved.
  4. *    Permission granted for non-commercial use
  5. *
  6. * asmsupp.i -- random low level assembly support routines
  7. *
  8. *************************************************************************
  9.  
  10. CLEAR    MACRO        ;quick way to clear a D register on 68000
  11.     MOVEQ    #0,\1
  12.     ENDM
  13.  
  14. ;BHS     MACRO
  15. ;     BCC.\0  \1 ;\0 is the extension used on the macro (such as ".s")
  16. ;     ENDM
  17. ;BLO     MACRO
  18. ;     BCS.\0  \1
  19. ;     ENDM
  20.  
  21. EVEN    MACRO        ; word align code stream
  22.     DS.W    0
  23.     ENDM
  24.  
  25. LINKSYS MACRO        ; link to a library without having to see a _LVO
  26.     MOVE.L    A6,-(SP)
  27.     MOVE.L    \2,A6
  28.     JSR    _LVO\1(A6)
  29.     MOVE.L    (SP)+,A6
  30.     ENDM
  31.  
  32. CALLSYS MACRO        ; call a library via A6 without having to see _LVO
  33.     JSR    _LVO\1(A6)
  34.     ENDM
  35.  
  36. XLIB    MACRO        ; define a library reference without the _LVO
  37.     XREF    _LVO\1
  38.     ENDM
  39. ;
  40. ; Put a message to the serial port at 9600 baud.  Used as so:
  41. ;
  42. ;     PUTMSG   30,<'%s/Init: called'>
  43. ;
  44. ; Parameters can be printed out by pushing them on the stack and
  45. ; adding the appropriate C printf-style % formatting commands.
  46. ;
  47.         XREF    KPutFmt
  48.  
  49. PUTMSG:     MACRO    * level,msg
  50.  
  51.         IFGE    INFO_LEVEL-\1
  52.  
  53.         PEA    subSysName(PC)
  54.         MOVEM.L A0/A1/D0/D1,-(SP)
  55.         LEA    msg\@,A0    ;Point to static format string
  56.         LEA    4*4(SP),A1      ;Point to args
  57.         JSR    KPutFmt
  58.         MOVEM.L (SP)+,D0/D1/A0/A1
  59.         ADDQ.L    #4,SP
  60.         BRA.S    end\@
  61.  
  62. msg\@        DC.B    \2
  63.         DC.B    10
  64.         DC.B    0
  65.         DS.W    0
  66. end\@
  67.         ENDC
  68.         ENDM
  69.